{% extends 'layout.html' %} 
{% block main %}
<div class="table_content">
    <div class="table_content_head pd_b20 pd_t20 clear">
        <a href="javascript:window.history.back();" class="small_btn orange_color fr">返回</a>
    </div>
    <form action="/admin/article/add" method="post" enctype="multipart/form-data">
		<div class="form-group">
	    	<label for="tagName">文章标题</label>
	    	<input type="text" name="title" class="form-control" id="exampleInputEmail1" placeholder="请输入文章标题">
	  	</div>
	  	<div class="form-group">
	  		<label for="tagName">所属分类</label>
	  	</div>
		<div class="form-group">
			<div class="create_add_line mr_t0 clear">
	            <div class="create_add_r ofh">
	                <ul class="check_list clear">
	                	{% for obj in menus %}
	                    <li class="radio_input" onclick="checkRadio(this,'radio');"><span class="check_btn icon"></span><input name="menu" type="radio" value="{{obj.id}}" />{{obj.menu}}</li>
	                    {% endfor %}
	                </ul>
	            </div>
	        </div>
        </div>
	  	<div class="form-group">
	  		<label for="tagName">所属标签</label>
	  	</div>
		<div class="form-group">
			<div class="create_add_line mr_t0 clear">
	            <div class="create_add_r ofh">
	                <ul class="check_list clear">
	                	{% for tag in tags %}
	                    <li class="checkbox_input" onclick="checkRadio(this,'checkbox');"><span class="check_btn icon"></span><input name="tag{{tag.id}}" type="checkbox" value="{{tag.id}}" />{{tag.tag}}</li>
	                    {% endfor %}
	                </ul>
	            </div>
	        </div>
        </div>
        <div class="form-group">
	  		<label for="tagName">图片上传</label>
	  		<ul class="update_list clear">
                <li>
                    <div class="update_list_w beige_bg">
                        <img class="update_img" src="">
                        <p class="update_prompt"><em>680*345</em>像素<br/>支持JPG/PNG等图片格式<br/>大小1m以下</p>
                        <span class="library_img top"><input type="file" name="fileImg" value="" onchange="getImgUrl(this)" accept="image/*" >上传图片</span>
                    </div>
                </li>
            </ul>
	  	</div>
	  	<div class="form-group">
	    	<label>文章概要</label>
	    	<textarea class="form-control" name="summary"  placeholder="请输入文章概要" rows="3"></textarea>
	  	</div>
	  	<div class="form-group">
	    	<label >文章内容</label>
	    	<textarea class="form-control" name="content" placeholder="请输入文章内容" rows="5"></textarea>
	  	</div>
	  	<div class="form-group">
	    	<div class="col-sm-offset-2 col-sm-10">
	      		<button type="submit" class="btn btn-default orange_color mr_r20">保存</button><button type="button" class="btn btn-default" onclick="confirmAlert('{{messageText}}','{{hrefUrl}}');">取消</button>
	    	</div>
	  	</div>
	</form>
</div>
{% endblock %}
